﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;

namespace DFGK_WMS.IRepository
{
    public interface ITInventoryRepository : IBaseRepository<TInventory>
    {
        /// <summary>
        /// 库存汇总查询
        /// </summary>
        /// <param name="totalCount"></param>
        /// <param name="owerId">货主id</param>
        /// <param name="whId">仓库名称</param>
        /// <param name="wlName">物料名称</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<TInventory> GetTInventoryPage(out int totalCount, out int totalQty, out decimal totalTotalWeight, int? owerId, int? whId,string? wlName, int pageIndex = 1, int pageSize = 10);
        /// <summary>
        /// 批次汇总查询
        /// </summary>
        /// <param name="totalCount"></param>
        /// <param name="owerId"></param>
        /// <param name="whId"></param>
        /// <param name="wlName"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<TInventory> GetTInventoryBatchNo(out int totalCount, out int totalQty, out decimal totalTotalWeight, int? owerId, int? whId, string? wlName, int pageIndex = 1, int pageSize = 10);
        /// <summary>
        /// 库存明细查询
        /// </summary>
        /// <param name="totalCount"></param>
        /// <param name="owerId">货主id</param>
        /// <param name="whId">仓库名称</param>
        /// <param name="wlName">物料名称</param>
        /// <param name="kcState">库存状态</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<TInventoryDto> GetTInventoryDtoPage(out int totalCount, int? owerId, int? whId, string? wlName,int? kcState, int pageIndex = 1, int pageSize = 10);

        /// <summary>
        /// 查询所有库存表信息（非分页）
        /// </summary>
        /// <returns></returns>
        List<TInventory> GetInventoryList();
        /// <summary>
        /// 导出库存
        /// </summary>
        /// <returns></returns>
        List<TInventory> GetTInventoryExcel(int? owerId, int? whId, string? wlName);


        /// <summary>
        /// 库存查询
        /// </summary>
        /// <param name="wlName"></param>
        /// <param name="whId"></param>
        /// <param name="owerId"></param>
        /// <param name="wlCode"></param>
        /// <param name="batchNo"></param>
        /// <param name="materialType"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<InventoryAllDto> GetAllInventory(out int totalCount,string? wlName,int? whId,int? owerId,string? wlCode,string? batchNo,int? materialType,int pageIndex,int pageSize);
    }
}
